define(function(require,exports,module){
    var Base={
		mBaserSvrUrl:window.BaseServerUrl,
		localStorage:window.localStorage
	};
	
	function JlnRequest(){
		this.params={}
	}
	module.exports=ProductProxy;
function ProductProxy(){
	function productSubmit(request, success, ignoreError) {
	    var url = Base.mBaserSvrUrl+'/product';
        if (request.svr == null) request.svr = undefined;
	    if (request.token == null) request.token = undefined;
	    var content = JSON.stringify(request);
       
	    url = url + '?f=t&data=' + encodeURIComponent(content);
	    url = url + '&CallBack=?';
        $.getJSON(url,success);

	}

	function createProcudtJsonRq(union,teamToken,jsonData,success,ignoreError){
        var request=new JlnRequest();
        request.func='createProcudtJson';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['teamToken']=teamToken;
		request.params['jd']=jsonData;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.createProcudtJsonRequest=function(teamToken,jsonData,success,ignoreError){
       var request= createProcudtJsonRq(true,teamToken,jsonData,success,ignoreError);
       return request;
    }
	this.createProcudtJson=function(teamToken,jsonData,success,ignoreError){
       var request= createProcudtJsonRq(false,teamToken,jsonData,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function modifyProductJsonRq(union,teamToken,jsonData,success,ignoreError){
        var request=new JlnRequest();
        request.func='modifyProductJson';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['teamToken']=teamToken;
		request.params['jd']=jsonData;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.modifyProductJsonRequest=function(teamToken,jsonData,success,ignoreError){
       var request= modifyProductJsonRq(true,teamToken,jsonData,success,ignoreError);
       return request;
    }
	this.modifyProductJson=function(teamToken,jsonData,success,ignoreError){
       var request= modifyProductJsonRq(false,teamToken,jsonData,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function modifyProcudtRq(union,teamToken,product,success,ignoreError){
        var request=new JlnRequest();
        request.func='modifyProcudt';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['teamToken']=teamToken;
		request.params['p']=product;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.modifyProcudtRequest=function(teamToken,product,success,ignoreError){
       var request= modifyProcudtRq(true,teamToken,product,success,ignoreError);
       return request;
    }
	this.modifyProcudt=function(teamToken,product,success,ignoreError){
       var request= modifyProcudtRq(false,teamToken,product,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function modifyProductIncomingRq(union,teamToken,productId,recordTime,today,week,month,year,success,ignoreError){
        var request=new JlnRequest();
        request.func='modifyProductIncoming';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['teamToken']=teamToken;
		request.params['pid']=productId;
		request.params['rt']=recordTime;
		request.params['t']=today;
		request.params['w']=week;
		request.params['m']=month;
		request.params['y']=year;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.modifyProductIncomingRequest=function(teamToken,productId,recordTime,today,week,month,year,success,ignoreError){
       var request= modifyProductIncomingRq(true,teamToken,productId,recordTime,today,week,month,year,success,ignoreError);
       return request;
    }
	this.modifyProductIncoming=function(teamToken,productId,recordTime,today,week,month,year,success,ignoreError){
       var request= modifyProductIncomingRq(false,teamToken,productId,recordTime,today,week,month,year,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function buyProductRq(union,userToken,clientId,productId,money,fee,actualFeeRate,success,ignoreError){
        var request=new JlnRequest();
        request.func='buyProduct';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['userToken']=userToken;
		request.params['cid']=clientId;
		request.params['pid']=productId;
		request.params['m']=money;
		request.params['f']=fee;
		request.params['afr']=actualFeeRate;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.buyProductRequest=function(userToken,clientId,productId,money,fee,actualFeeRate,success,ignoreError){
       var request= buyProductRq(true,userToken,clientId,productId,money,fee,actualFeeRate,success,ignoreError);
       return request;
    }
	this.buyProduct=function(userToken,clientId,productId,money,fee,actualFeeRate,success,ignoreError){
       var request= buyProductRq(false,userToken,clientId,productId,money,fee,actualFeeRate,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function RandsomProductByPasswordRq(union,userToken,clientId,password,productId,money,partNumber,success,ignoreError){
        var request=new JlnRequest();
        request.func='RandsomProductByPassword';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['userToken']=userToken;
		request.params['cid']=clientId;
		request.params['p']=password;
		request.params['pid']=productId;
		request.params['m']=money;
		request.params['pn']=partNumber;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.RandsomProductByPasswordRequest=function(userToken,clientId,password,productId,money,partNumber,success,ignoreError){
       var request= RandsomProductByPasswordRq(true,userToken,clientId,password,productId,money,partNumber,success,ignoreError);
       return request;
    }
	this.RandsomProductByPassword=function(userToken,clientId,password,productId,money,partNumber,success,ignoreError){
       var request= RandsomProductByPasswordRq(false,userToken,clientId,password,productId,money,partNumber,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function RandsomProductByValidCodeRq(union,userToken,clientId,validCode,productId,money,partNumber,success,ignoreError){
        var request=new JlnRequest();
        request.func='RandsomProductByValidCode';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['userToken']=userToken;
		request.params['cid']=clientId;
		request.params['validCode']=validCode;
		request.params['pid']=productId;
		request.params['m']=money;
		request.params['pn']=partNumber;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.RandsomProductByValidCodeRequest=function(userToken,clientId,validCode,productId,money,partNumber,success,ignoreError){
       var request= RandsomProductByValidCodeRq(true,userToken,clientId,validCode,productId,money,partNumber,success,ignoreError);
       return request;
    }
	this.RandsomProductByValidCode=function(userToken,clientId,validCode,productId,money,partNumber,success,ignoreError){
       var request= RandsomProductByValidCodeRq(false,userToken,clientId,validCode,productId,money,partNumber,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function confirmBuyOrderRq(union,teamToken,orderId,isAccepted,net,partNumber,remark,success,ignoreError){
        var request=new JlnRequest();
        request.func='confirmBuyOrder';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['teamToken']=teamToken;
		request.params['oid']=orderId;
		request.params['ia']=isAccepted;
		request.params['n']=net;
		request.params['pn']=partNumber;
		request.params['r']=remark;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.confirmBuyOrderRequest=function(teamToken,orderId,isAccepted,net,partNumber,remark,success,ignoreError){
       var request= confirmBuyOrderRq(true,teamToken,orderId,isAccepted,net,partNumber,remark,success,ignoreError);
       return request;
    }
	this.confirmBuyOrder=function(teamToken,orderId,isAccepted,net,partNumber,remark,success,ignoreError){
       var request= confirmBuyOrderRq(false,teamToken,orderId,isAccepted,net,partNumber,remark,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function confirmRandsomOrderRq(union,teamToken,orderId,isAccepted,net,fee,partNumber,money,remark,success,ignoreError){
        var request=new JlnRequest();
        request.func='confirmRandsomOrder';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['teamToken']=teamToken;
		request.params['oid']=orderId;
		request.params['ia']=isAccepted;
		request.params['n']=net;
		request.params['f']=fee;
		request.params['pn']=partNumber;
		request.params['m']=money;
		request.params['r']=remark;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.confirmRandsomOrderRequest=function(teamToken,orderId,isAccepted,net,fee,partNumber,money,remark,success,ignoreError){
       var request= confirmRandsomOrderRq(true,teamToken,orderId,isAccepted,net,fee,partNumber,money,remark,success,ignoreError);
       return request;
    }
	this.confirmRandsomOrder=function(teamToken,orderId,isAccepted,net,fee,partNumber,money,remark,success,ignoreError){
       var request= confirmRandsomOrderRq(false,teamToken,orderId,isAccepted,net,fee,partNumber,money,remark,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function queryOrdersRq(union,userToken,beginTime,endTime,type,nameQuery,status,page,countPerPage,success,ignoreError){
        var request=new JlnRequest();
        request.func='queryOrders';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['userToken']=userToken;
		request.params['bt']=beginTime;
		request.params['et']=endTime;
		request.params['t']=type;
		request.params['nq']=nameQuery;
		request.params['s']=status;
		request.params['p']=page;
		request.params['cpp']=countPerPage;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.queryOrdersRequest=function(userToken,beginTime,endTime,type,nameQuery,status,page,countPerPage,success,ignoreError){
       var request= queryOrdersRq(true,userToken,beginTime,endTime,type,nameQuery,status,page,countPerPage,success,ignoreError);
       return request;
    }
	this.queryOrders=function(userToken,beginTime,endTime,type,nameQuery,status,page,countPerPage,success,ignoreError){
       var request= queryOrdersRq(false,userToken,beginTime,endTime,type,nameQuery,status,page,countPerPage,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function cancelOrderRq(union,userToken,orderId,success,ignoreError){
        var request=new JlnRequest();
        request.func='cancelOrder';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['userToken']=userToken;
		request.params['oid']=orderId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.cancelOrderRequest=function(userToken,orderId,success,ignoreError){
       var request= cancelOrderRq(true,userToken,orderId,success,ignoreError);
       return request;
    }
	this.cancelOrder=function(userToken,orderId,success,ignoreError){
       var request= cancelOrderRq(false,userToken,orderId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getOrderRq(union,userToekn,orderId,success,ignoreError){
        var request=new JlnRequest();
        request.func='getOrder';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['ut']=userToekn;
		request.params['oid']=orderId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getOrderRequest=function(userToekn,orderId,success,ignoreError){
       var request= getOrderRq(true,userToekn,orderId,success,ignoreError);
       return request;
    }
	this.getOrder=function(userToekn,orderId,success,ignoreError){
       var request= getOrderRq(false,userToekn,orderId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getOrdersRq(union,userToken,query,beginTime,endTime,status,page,countPerPage,success,ignoreError){
        var request=new JlnRequest();
        request.func='getOrders';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['userToken']=userToken;
		request.params['q']=query;
		request.params['bt']=beginTime;
		request.params['et']=endTime;
		request.params['s']=status;
		request.params['p']=page;
		request.params['cpp']=countPerPage;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getOrdersRequest=function(userToken,query,beginTime,endTime,status,page,countPerPage,success,ignoreError){
       var request= getOrdersRq(true,userToken,query,beginTime,endTime,status,page,countPerPage,success,ignoreError);
       return request;
    }
	this.getOrders=function(userToken,query,beginTime,endTime,status,page,countPerPage,success,ignoreError){
       var request= getOrdersRq(false,userToken,query,beginTime,endTime,status,page,countPerPage,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getProductOrdersRq(union,userToken,productId,type,query,beginTime,endTime,status,page,countPerPage,success,ignoreError){
        var request=new JlnRequest();
        request.func='getProductOrders';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['userToken']=userToken;
		request.params['pid']=productId;
		request.params['t']=type;
		request.params['q']=query;
		request.params['bt']=beginTime;
		request.params['et']=endTime;
		request.params['s']=status;
		request.params['p']=page;
		request.params['cpp']=countPerPage;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getProductOrdersRequest=function(userToken,productId,type,query,beginTime,endTime,status,page,countPerPage,success,ignoreError){
       var request= getProductOrdersRq(true,userToken,productId,type,query,beginTime,endTime,status,page,countPerPage,success,ignoreError);
       return request;
    }
	this.getProductOrders=function(userToken,productId,type,query,beginTime,endTime,status,page,countPerPage,success,ignoreError){
       var request= getProductOrdersRq(false,userToken,productId,type,query,beginTime,endTime,status,page,countPerPage,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getTeamProductOrdersRq(union,teamToken,productId,type,query,beginTime,endTime,status,page,countPerPage,success,ignoreError){
        var request=new JlnRequest();
        request.func='getTeamProductOrders';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['teamToken']=teamToken;
		request.params['pid']=productId;
		request.params['t']=type;
		request.params['q']=query;
		request.params['bt']=beginTime;
		request.params['et']=endTime;
		request.params['s']=status;
		request.params['p']=page;
		request.params['cpp']=countPerPage;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getTeamProductOrdersRequest=function(teamToken,productId,type,query,beginTime,endTime,status,page,countPerPage,success,ignoreError){
       var request= getTeamProductOrdersRq(true,teamToken,productId,type,query,beginTime,endTime,status,page,countPerPage,success,ignoreError);
       return request;
    }
	this.getTeamProductOrders=function(teamToken,productId,type,query,beginTime,endTime,status,page,countPerPage,success,ignoreError){
       var request= getTeamProductOrdersRq(false,teamToken,productId,type,query,beginTime,endTime,status,page,countPerPage,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getWaitTeamProductOrdersCountRq(union,teamToken,success,ignoreError){
        var request=new JlnRequest();
        request.func='getWaitTeamProductOrdersCount';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['teamToken']=teamToken;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getWaitTeamProductOrdersCountRequest=function(teamToken,success,ignoreError){
       var request= getWaitTeamProductOrdersCountRq(true,teamToken,success,ignoreError);
       return request;
    }
	this.getWaitTeamProductOrdersCount=function(teamToken,success,ignoreError){
       var request= getWaitTeamProductOrdersCountRq(false,teamToken,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function approveRq(union,userToken,productId,pass,success,ignoreError){
        var request=new JlnRequest();
        request.func='approve';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['userToken']=userToken;
		request.params['pid']=productId;
		request.params['p']=pass;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.approveRequest=function(userToken,productId,pass,success,ignoreError){
       var request= approveRq(true,userToken,productId,pass,success,ignoreError);
       return request;
    }
	this.approve=function(userToken,productId,pass,success,ignoreError){
       var request= approveRq(false,userToken,productId,pass,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getTeamProductsRq(union,teamId,order,status,page,countPerPage,success,ignoreError){
        var request=new JlnRequest();
        request.func='getTeamProducts';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['tid']=teamId;
		request.params['o']=order;
		request.params['s']=status;
		request.params['p']=page;
		request.params['cpp']=countPerPage;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getTeamProductsRequest=function(teamId,order,status,page,countPerPage,success,ignoreError){
       var request= getTeamProductsRq(true,teamId,order,status,page,countPerPage,success,ignoreError);
       return request;
    }
	this.getTeamProducts=function(teamId,order,status,page,countPerPage,success,ignoreError){
       var request= getTeamProductsRq(false,teamId,order,status,page,countPerPage,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getProductsRq(union,order,status,page,countPerPage,success,ignoreError){
        var request=new JlnRequest();
        request.func='getProducts';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['o']=order;
		request.params['s']=status;
		request.params['p']=page;
		request.params['cpp']=countPerPage;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getProductsRequest=function(order,status,page,countPerPage,success,ignoreError){
       var request= getProductsRq(true,order,status,page,countPerPage,success,ignoreError);
       return request;
    }
	this.getProducts=function(order,status,page,countPerPage,success,ignoreError){
       var request= getProductsRq(false,order,status,page,countPerPage,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getProductsByTypeRq(union,order,type,strategyType,status,page,countPerPage,success,ignoreError){
        var request=new JlnRequest();
        request.func='getProductsByType';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['o']=order;
		request.params['t']=type;
		request.params['st']=strategyType;
		request.params['s']=status;
		request.params['p']=page;
		request.params['cpp']=countPerPage;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getProductsByTypeRequest=function(order,type,strategyType,status,page,countPerPage,success,ignoreError){
       var request= getProductsByTypeRq(true,order,type,strategyType,status,page,countPerPage,success,ignoreError);
       return request;
    }
	this.getProductsByType=function(order,type,strategyType,status,page,countPerPage,success,ignoreError){
       var request= getProductsByTypeRq(false,order,type,strategyType,status,page,countPerPage,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getMyProductRq(union,userToken,beginTime,endTime,status,page,countPerPage,success,ignoreError){
        var request=new JlnRequest();
        request.func='getMyProduct';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['userToken']=userToken;
		request.params['bt']=beginTime;
		request.params['et']=endTime;
		request.params['s']=status;
		request.params['p']=page;
		request.params['cpp']=countPerPage;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getMyProductRequest=function(userToken,beginTime,endTime,status,page,countPerPage,success,ignoreError){
       var request= getMyProductRq(true,userToken,beginTime,endTime,status,page,countPerPage,success,ignoreError);
       return request;
    }
	this.getMyProduct=function(userToken,beginTime,endTime,status,page,countPerPage,success,ignoreError){
       var request= getMyProductRq(false,userToken,beginTime,endTime,status,page,countPerPage,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getMyProductObjRq(union,userToken,productId,success,ignoreError){
        var request=new JlnRequest();
        request.func='getMyProductObj';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['userToken']=userToken;
		request.params['pid']=productId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getMyProductObjRequest=function(userToken,productId,success,ignoreError){
       var request= getMyProductObjRq(true,userToken,productId,success,ignoreError);
       return request;
    }
	this.getMyProductObj=function(userToken,productId,success,ignoreError){
       var request= getMyProductObjRq(false,userToken,productId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getMyProductForRandsomRq(union,userToken,productId,success,ignoreError){
        var request=new JlnRequest();
        request.func='getMyProductForRandsom';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['userToken']=userToken;
		request.params['pid']=productId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getMyProductForRandsomRequest=function(userToken,productId,success,ignoreError){
       var request= getMyProductForRandsomRq(true,userToken,productId,success,ignoreError);
       return request;
    }
	this.getMyProductForRandsom=function(userToken,productId,success,ignoreError){
       var request= getMyProductForRandsomRq(false,userToken,productId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getMyProductOrdersRq(union,userToken,productId,success,ignoreError){
        var request=new JlnRequest();
        request.func='getMyProductOrders';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['userToken']=userToken;
		request.params['pid']=productId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getMyProductOrdersRequest=function(userToken,productId,success,ignoreError){
       var request= getMyProductOrdersRq(true,userToken,productId,success,ignoreError);
       return request;
    }
	this.getMyProductOrders=function(userToken,productId,success,ignoreError){
       var request= getMyProductOrdersRq(false,userToken,productId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getProductSimpleRq(union,productId,success,ignoreError){
        var request=new JlnRequest();
        request.func='getProductSimple';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['pid']=productId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getProductSimpleRequest=function(productId,success,ignoreError){
       var request= getProductSimpleRq(true,productId,success,ignoreError);
       return request;
    }
	this.getProductSimple=function(productId,success,ignoreError){
       var request= getProductSimpleRq(false,productId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getProductRq(union,productId,success,ignoreError){
        var request=new JlnRequest();
        request.func='getProduct';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['pid']=productId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getProductRequest=function(productId,success,ignoreError){
       var request= getProductRq(true,productId,success,ignoreError);
       return request;
    }
	this.getProduct=function(productId,success,ignoreError){
       var request= getProductRq(false,productId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function setProductExtendJsonRq(union,teamToken,productId,jsonData,success,ignoreError){
        var request=new JlnRequest();
        request.func='setProductExtendJson';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['teamToken']=teamToken;
		request.params['pid']=productId;
		request.params['jd']=jsonData;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.setProductExtendJsonRequest=function(teamToken,productId,jsonData,success,ignoreError){
       var request= setProductExtendJsonRq(true,teamToken,productId,jsonData,success,ignoreError);
       return request;
    }
	this.setProductExtendJson=function(teamToken,productId,jsonData,success,ignoreError){
       var request= setProductExtendJsonRq(false,teamToken,productId,jsonData,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getProductExtendRq(union,productId,success,ignoreError){
        var request=new JlnRequest();
        request.func='getProductExtend';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['pid']=productId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getProductExtendRequest=function(productId,success,ignoreError){
       var request= getProductExtendRq(true,productId,success,ignoreError);
       return request;
    }
	this.getProductExtend=function(productId,success,ignoreError){
       var request= getProductExtendRq(false,productId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function setProductBuyNoticeJsonRq(union,teamToken,productId,jsonData,success,ignoreError){
        var request=new JlnRequest();
        request.func='setProductBuyNoticeJson';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['teamToken']=teamToken;
		request.params['pid']=productId;
		request.params['jd']=jsonData;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.setProductBuyNoticeJsonRequest=function(teamToken,productId,jsonData,success,ignoreError){
       var request= setProductBuyNoticeJsonRq(true,teamToken,productId,jsonData,success,ignoreError);
       return request;
    }
	this.setProductBuyNoticeJson=function(teamToken,productId,jsonData,success,ignoreError){
       var request= setProductBuyNoticeJsonRq(false,teamToken,productId,jsonData,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getProductBuyNoticeRq(union,productId,success,ignoreError){
        var request=new JlnRequest();
        request.func='getProductBuyNotice';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['pid']=productId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getProductBuyNoticeRequest=function(productId,success,ignoreError){
       var request= getProductBuyNoticeRq(true,productId,success,ignoreError);
       return request;
    }
	this.getProductBuyNotice=function(productId,success,ignoreError){
       var request= getProductBuyNoticeRq(false,productId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function setProductRiskControlJsonRq(union,teamToken,productId,jsonData,netFilePath,success,ignoreError){
        var request=new JlnRequest();
        request.func='setProductRiskControlJson';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['teamToken']=teamToken;
		request.params['pid']=productId;
		request.params['jd']=jsonData;
		request.params['nfp']=netFilePath;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.setProductRiskControlJsonRequest=function(teamToken,productId,jsonData,netFilePath,success,ignoreError){
       var request= setProductRiskControlJsonRq(true,teamToken,productId,jsonData,netFilePath,success,ignoreError);
       return request;
    }
	this.setProductRiskControlJson=function(teamToken,productId,jsonData,netFilePath,success,ignoreError){
       var request= setProductRiskControlJsonRq(false,teamToken,productId,jsonData,netFilePath,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getProductRiskControlRq(union,productId,success,ignoreError){
        var request=new JlnRequest();
        request.func='getProductRiskControl';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['pid']=productId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getProductRiskControlRequest=function(productId,success,ignoreError){
       var request= getProductRiskControlRq(true,productId,success,ignoreError);
       return request;
    }
	this.getProductRiskControl=function(productId,success,ignoreError){
       var request= getProductRiskControlRq(false,productId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function bindBankAccountRq(union,teamToken,productId,bankType,bankName,accountName,bankAccount,success,ignoreError){
        var request=new JlnRequest();
        request.func='bindBankAccount';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['teamToken']=teamToken;
		request.params['pid']=productId;
		request.params['bt']=bankType;
		request.params['bn']=bankName;
		request.params['an']=accountName;
		request.params['ba']=bankAccount;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.bindBankAccountRequest=function(teamToken,productId,bankType,bankName,accountName,bankAccount,success,ignoreError){
       var request= bindBankAccountRq(true,teamToken,productId,bankType,bankName,accountName,bankAccount,success,ignoreError);
       return request;
    }
	this.bindBankAccount=function(teamToken,productId,bankType,bankName,accountName,bankAccount,success,ignoreError){
       var request= bindBankAccountRq(false,teamToken,productId,bankType,bankName,accountName,bankAccount,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function validBankMoneyRq(union,teamToken,productId,money,success,ignoreError){
        var request=new JlnRequest();
        request.func='validBankMoney';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['teamToken']=teamToken;
		request.params['pid']=productId;
		request.params['m']=money;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.validBankMoneyRequest=function(teamToken,productId,money,success,ignoreError){
       var request= validBankMoneyRq(true,teamToken,productId,money,success,ignoreError);
       return request;
    }
	this.validBankMoney=function(teamToken,productId,money,success,ignoreError){
       var request= validBankMoneyRq(false,teamToken,productId,money,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function setTradePasswordRq(union,teamToken,productId,validCode,password,success,ignoreError){
        var request=new JlnRequest();
        request.func='setTradePassword';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['teamToken']=teamToken;
		request.params['pid']=productId;
		request.params['validCode']=validCode;
		request.params['p']=password;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.setTradePasswordRequest=function(teamToken,productId,validCode,password,success,ignoreError){
       var request= setTradePasswordRq(true,teamToken,productId,validCode,password,success,ignoreError);
       return request;
    }
	this.setTradePassword=function(teamToken,productId,validCode,password,success,ignoreError){
       var request= setTradePasswordRq(false,teamToken,productId,validCode,password,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function setProductNetsJsonRq(union,token,productId,jsonData,success,ignoreError){
        var request=new JlnRequest();
        request.func='setProductNetsJson';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['token']=token;
		request.params['pid']=productId;
		request.params['jd']=jsonData;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.setProductNetsJsonRequest=function(token,productId,jsonData,success,ignoreError){
       var request= setProductNetsJsonRq(true,token,productId,jsonData,success,ignoreError);
       return request;
    }
	this.setProductNetsJson=function(token,productId,jsonData,success,ignoreError){
       var request= setProductNetsJsonRq(false,token,productId,jsonData,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getProductIncomeHistoryRq(union,productId,success,ignoreError){
        var request=new JlnRequest();
        request.func='getProductIncomeHistory';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['pid']=productId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getProductIncomeHistoryRequest=function(productId,success,ignoreError){
       var request= getProductIncomeHistoryRq(true,productId,success,ignoreError);
       return request;
    }
	this.getProductIncomeHistory=function(productId,success,ignoreError){
       var request= getProductIncomeHistoryRq(false,productId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getProductNetHistoryRq(union,productId,beginTime,endTime,success,ignoreError){
        var request=new JlnRequest();
        request.func='getProductNetHistory';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['pid']=productId;
		request.params['bt']=beginTime;
		request.params['et']=endTime;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getProductNetHistoryRequest=function(productId,beginTime,endTime,success,ignoreError){
       var request= getProductNetHistoryRq(true,productId,beginTime,endTime,success,ignoreError);
       return request;
    }
	this.getProductNetHistory=function(productId,beginTime,endTime,success,ignoreError){
       var request= getProductNetHistoryRq(false,productId,beginTime,endTime,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getCSIRq(union,beginTime,endTime,success,ignoreError){
        var request=new JlnRequest();
        request.func='getCSI';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['bt']=beginTime;
		request.params['et']=endTime;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getCSIRequest=function(beginTime,endTime,success,ignoreError){
       var request= getCSIRq(true,beginTime,endTime,success,ignoreError);
       return request;
    }
	this.getCSI=function(beginTime,endTime,success,ignoreError){
       var request= getCSIRq(false,beginTime,endTime,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getProductIncomeMonthHistoryRq(union,productId,beginYear,endYear,beginMonth,endMonth,success,ignoreError){
        var request=new JlnRequest();
        request.func='getProductIncomeMonthHistory';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['pid']=productId;
		request.params['by']=beginYear;
		request.params['ey']=endYear;
		request.params['bm']=beginMonth;
		request.params['em']=endMonth;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getProductIncomeMonthHistoryRequest=function(productId,beginYear,endYear,beginMonth,endMonth,success,ignoreError){
       var request= getProductIncomeMonthHistoryRq(true,productId,beginYear,endYear,beginMonth,endMonth,success,ignoreError);
       return request;
    }
	this.getProductIncomeMonthHistory=function(productId,beginYear,endYear,beginMonth,endMonth,success,ignoreError){
       var request= getProductIncomeMonthHistoryRq(false,productId,beginYear,endYear,beginMonth,endMonth,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getProductIncomeQuarterHistoryRq(union,productId,beginYear,endYear,beginQuarter,endQuarter,success,ignoreError){
        var request=new JlnRequest();
        request.func='getProductIncomeQuarterHistory';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['pid']=productId;
		request.params['by']=beginYear;
		request.params['ey']=endYear;
		request.params['bq']=beginQuarter;
		request.params['eq']=endQuarter;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getProductIncomeQuarterHistoryRequest=function(productId,beginYear,endYear,beginQuarter,endQuarter,success,ignoreError){
       var request= getProductIncomeQuarterHistoryRq(true,productId,beginYear,endYear,beginQuarter,endQuarter,success,ignoreError);
       return request;
    }
	this.getProductIncomeQuarterHistory=function(productId,beginYear,endYear,beginQuarter,endQuarter,success,ignoreError){
       var request= getProductIncomeQuarterHistoryRq(false,productId,beginYear,endYear,beginQuarter,endQuarter,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getProductIncomeYearHistoryRq(union,productId,beginYear,endYear,success,ignoreError){
        var request=new JlnRequest();
        request.func='getProductIncomeYearHistory';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['pid']=productId;
		request.params['by']=beginYear;
		request.params['ey']=endYear;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getProductIncomeYearHistoryRequest=function(productId,beginYear,endYear,success,ignoreError){
       var request= getProductIncomeYearHistoryRq(true,productId,beginYear,endYear,success,ignoreError);
       return request;
    }
	this.getProductIncomeYearHistory=function(productId,beginYear,endYear,success,ignoreError){
       var request= getProductIncomeYearHistoryRq(false,productId,beginYear,endYear,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getProductDividendHistoryRq(union,productId,success,ignoreError){
        var request=new JlnRequest();
        request.func='getProductDividendHistory';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['pid']=productId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getProductDividendHistoryRequest=function(productId,success,ignoreError){
       var request= getProductDividendHistoryRq(true,productId,success,ignoreError);
       return request;
    }
	this.getProductDividendHistory=function(productId,success,ignoreError){
       var request= getProductDividendHistoryRq(false,productId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getProductSplitHistoryRq(union,productId,success,ignoreError){
        var request=new JlnRequest();
        request.func='getProductSplitHistory';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['pid']=productId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getProductSplitHistoryRequest=function(productId,success,ignoreError){
       var request= getProductSplitHistoryRq(true,productId,success,ignoreError);
       return request;
    }
	this.getProductSplitHistory=function(productId,success,ignoreError){
       var request= getProductSplitHistoryRq(false,productId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function queryProductsRq(union,type,beginTime,endTime,termId,status,incomeType,query,order,isAsc,isCanBuy,page,countPerPage,userType,success,ignoreError){
        var request=new JlnRequest();
        request.func='queryProducts';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['t']=type;
		request.params['bt']=beginTime;
		request.params['et']=endTime;
		request.params['tid']=termId;
		request.params['s']=status;
		request.params['it']=incomeType;
		request.params['q']=query;
		request.params['o']=order;
		request.params['ia']=isAsc;
		request.params['icb']=isCanBuy;
		request.params['p']=page;
		request.params['cpp']=countPerPage;
		request.params['ut']=userType;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.queryProductsRequest=function(type,beginTime,endTime,termId,status,incomeType,query,order,isAsc,isCanBuy,page,countPerPage,userType,success,ignoreError){
       var request= queryProductsRq(true,type,beginTime,endTime,termId,status,incomeType,query,order,isAsc,isCanBuy,page,countPerPage,userType,success,ignoreError);
       return request;
    }
	this.queryProducts=function(type,beginTime,endTime,termId,status,incomeType,query,order,isAsc,isCanBuy,page,countPerPage,userType,success,ignoreError){
       var request= queryProductsRq(false,type,beginTime,endTime,termId,status,incomeType,query,order,isAsc,isCanBuy,page,countPerPage,userType,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function queryInvestManagerProductsRq(union,managerId,query,order,isAsc,page,countPerPage,success,ignoreError){
        var request=new JlnRequest();
        request.func='queryInvestManagerProducts';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['mid']=managerId;
		request.params['q']=query;
		request.params['o']=order;
		request.params['ia']=isAsc;
		request.params['p']=page;
		request.params['cpp']=countPerPage;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.queryInvestManagerProductsRequest=function(managerId,query,order,isAsc,page,countPerPage,success,ignoreError){
       var request= queryInvestManagerProductsRq(true,managerId,query,order,isAsc,page,countPerPage,success,ignoreError);
       return request;
    }
	this.queryInvestManagerProducts=function(managerId,query,order,isAsc,page,countPerPage,success,ignoreError){
       var request= queryInvestManagerProductsRq(false,managerId,query,order,isAsc,page,countPerPage,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function setProductBuyOpenRq(union,token,productId,isOpen,isPurchase,openBeginTime,openEndtime,actualFeeRate,success,ignoreError){
        var request=new JlnRequest();
        request.func='setProductBuyOpen';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['token']=token;
		request.params['pid']=productId;
		request.params['io']=isOpen;
		request.params['ip']=isPurchase;
		request.params['obt']=openBeginTime;
		request.params['oe']=openEndtime;
		request.params['afr']=actualFeeRate;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.setProductBuyOpenRequest=function(token,productId,isOpen,isPurchase,openBeginTime,openEndtime,actualFeeRate,success,ignoreError){
       var request= setProductBuyOpenRq(true,token,productId,isOpen,isPurchase,openBeginTime,openEndtime,actualFeeRate,success,ignoreError);
       return request;
    }
	this.setProductBuyOpen=function(token,productId,isOpen,isPurchase,openBeginTime,openEndtime,actualFeeRate,success,ignoreError){
       var request= setProductBuyOpenRq(false,token,productId,isOpen,isPurchase,openBeginTime,openEndtime,actualFeeRate,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function setProductRansomOpenRq(union,token,productId,isOpen,ransomBeginTime,ransomEndtime,success,ignoreError){
        var request=new JlnRequest();
        request.func='setProductRansomOpen';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['token']=token;
		request.params['pid']=productId;
		request.params['io']=isOpen;
		request.params['rbt']=ransomBeginTime;
		request.params['re']=ransomEndtime;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.setProductRansomOpenRequest=function(token,productId,isOpen,ransomBeginTime,ransomEndtime,success,ignoreError){
       var request= setProductRansomOpenRq(true,token,productId,isOpen,ransomBeginTime,ransomEndtime,success,ignoreError);
       return request;
    }
	this.setProductRansomOpen=function(token,productId,isOpen,ransomBeginTime,ransomEndtime,success,ignoreError){
       var request= setProductRansomOpenRq(false,token,productId,isOpen,ransomBeginTime,ransomEndtime,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function setProductStatusRq(union,token,productId,status,success,ignoreError){
        var request=new JlnRequest();
        request.func='setProductStatus';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['token']=token;
		request.params['pid']=productId;
		request.params['s']=status;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.setProductStatusRequest=function(token,productId,status,success,ignoreError){
       var request= setProductStatusRq(true,token,productId,status,success,ignoreError);
       return request;
    }
	this.setProductStatus=function(token,productId,status,success,ignoreError){
       var request= setProductStatusRq(false,token,productId,status,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function setProductRaisedStatusRq(union,token,productId,status,progress,success,ignoreError){
        var request=new JlnRequest();
        request.func='setProductRaisedStatus';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['token']=token;
		request.params['pid']=productId;
		request.params['s']=status;
		request.params['p']=progress;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.setProductRaisedStatusRequest=function(token,productId,status,progress,success,ignoreError){
       var request= setProductRaisedStatusRq(true,token,productId,status,progress,success,ignoreError);
       return request;
    }
	this.setProductRaisedStatus=function(token,productId,status,progress,success,ignoreError){
       var request= setProductRaisedStatusRq(false,token,productId,status,progress,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function setProductFundDataRq(union,token,productId,totalFund,currentNumber,success,ignoreError){
        var request=new JlnRequest();
        request.func='setProductFundData';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['token']=token;
		request.params['pid']=productId;
		request.params['tf']=totalFund;
		request.params['cn']=currentNumber;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.setProductFundDataRequest=function(token,productId,totalFund,currentNumber,success,ignoreError){
       var request= setProductFundDataRq(true,token,productId,totalFund,currentNumber,success,ignoreError);
       return request;
    }
	this.setProductFundData=function(token,productId,totalFund,currentNumber,success,ignoreError){
       var request= setProductFundDataRq(false,token,productId,totalFund,currentNumber,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function setProductRunningRq(union,token,productId,status,totalFund,currentNumber,isOpenBuy,isPurchase,openBeginTime,openEndtime,isOpenRansom,ransomBeginTime,ransomEndtime,success,ignoreError){
        var request=new JlnRequest();
        request.func='setProductRunning';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['token']=token;
		request.params['pid']=productId;
		request.params['s']=status;
		request.params['tf']=totalFund;
		request.params['cn']=currentNumber;
		request.params['iob']=isOpenBuy;
		request.params['ip']=isPurchase;
		request.params['obt']=openBeginTime;
		request.params['oe']=openEndtime;
		request.params['ior']=isOpenRansom;
		request.params['rbt']=ransomBeginTime;
		request.params['re']=ransomEndtime;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.setProductRunningRequest=function(token,productId,status,totalFund,currentNumber,isOpenBuy,isPurchase,openBeginTime,openEndtime,isOpenRansom,ransomBeginTime,ransomEndtime,success,ignoreError){
       var request= setProductRunningRq(true,token,productId,status,totalFund,currentNumber,isOpenBuy,isPurchase,openBeginTime,openEndtime,isOpenRansom,ransomBeginTime,ransomEndtime,success,ignoreError);
       return request;
    }
	this.setProductRunning=function(token,productId,status,totalFund,currentNumber,isOpenBuy,isPurchase,openBeginTime,openEndtime,isOpenRansom,ransomBeginTime,ransomEndtime,success,ignoreError){
       var request= setProductRunningRq(false,token,productId,status,totalFund,currentNumber,isOpenBuy,isPurchase,openBeginTime,openEndtime,isOpenRansom,ransomBeginTime,ransomEndtime,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getProductCanBuyRq(union,productId,success,ignoreError){
        var request=new JlnRequest();
        request.func='getProductCanBuy';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['pid']=productId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getProductCanBuyRequest=function(productId,success,ignoreError){
       var request= getProductCanBuyRq(true,productId,success,ignoreError);
       return request;
    }
	this.getProductCanBuy=function(productId,success,ignoreError){
       var request= getProductCanBuyRq(false,productId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getProductCanRansomRq(union,productId,success,ignoreError){
        var request=new JlnRequest();
        request.func='getProductCanRansom';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['pid']=productId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getProductCanRansomRequest=function(productId,success,ignoreError){
       var request= getProductCanRansomRq(true,productId,success,ignoreError);
       return request;
    }
	this.getProductCanRansom=function(productId,success,ignoreError){
       var request= getProductCanRansomRq(false,productId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function setProductRunningBaseRq(union,teamToken,data,success,ignoreError){
        var request=new JlnRequest();
        request.func='setProductRunningBase';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['teamToken']=teamToken;
		request.params['d']=data;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.setProductRunningBaseRequest=function(teamToken,data,success,ignoreError){
       var request= setProductRunningBaseRq(true,teamToken,data,success,ignoreError);
       return request;
    }
	this.setProductRunningBase=function(teamToken,data,success,ignoreError){
       var request= setProductRunningBaseRq(false,teamToken,data,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function setProductRunningBaseJsonRq(union,teamToken,jsonData,success,ignoreError){
        var request=new JlnRequest();
        request.func='setProductRunningBaseJson';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['teamToken']=teamToken;
		request.params['jd']=jsonData;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.setProductRunningBaseJsonRequest=function(teamToken,jsonData,success,ignoreError){
       var request= setProductRunningBaseJsonRq(true,teamToken,jsonData,success,ignoreError);
       return request;
    }
	this.setProductRunningBaseJson=function(teamToken,jsonData,success,ignoreError){
       var request= setProductRunningBaseJsonRq(false,teamToken,jsonData,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function setProductContractJsonRq(union,teamToken,productId,jsonData,success,ignoreError){
        var request=new JlnRequest();
        request.func='setProductContractJson';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['teamToken']=teamToken;
		request.params['pid']=productId;
		request.params['jd']=jsonData;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.setProductContractJsonRequest=function(teamToken,productId,jsonData,success,ignoreError){
       var request= setProductContractJsonRq(true,teamToken,productId,jsonData,success,ignoreError);
       return request;
    }
	this.setProductContractJson=function(teamToken,productId,jsonData,success,ignoreError){
       var request= setProductContractJsonRq(false,teamToken,productId,jsonData,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getProductContractRq(union,productId,success,ignoreError){
        var request=new JlnRequest();
        request.func='getProductContract';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['pid']=productId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getProductContractRequest=function(productId,success,ignoreError){
       var request= getProductContractRq(true,productId,success,ignoreError);
       return request;
    }
	this.getProductContract=function(productId,success,ignoreError){
       var request= getProductContractRq(false,productId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getOrderContractRq(union,token,orderSId,success,ignoreError){
        var request=new JlnRequest();
        request.func='getOrderContract';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['token']=token;
		request.params['osid']=orderSId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getOrderContractRequest=function(token,orderSId,success,ignoreError){
       var request= getOrderContractRq(true,token,orderSId,success,ignoreError);
       return request;
    }
	this.getOrderContract=function(token,orderSId,success,ignoreError){
       var request= getOrderContractRq(false,token,orderSId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getBindBankRq(union,token,productSId,success,ignoreError){
        var request=new JlnRequest();
        request.func='getBindBank';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['token']=token;
		request.params['psid']=productSId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getBindBankRequest=function(token,productSId,success,ignoreError){
       var request= getBindBankRq(true,token,productSId,success,ignoreError);
       return request;
    }
	this.getBindBank=function(token,productSId,success,ignoreError){
       var request= getBindBankRq(false,token,productSId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getProductRunningBaseRq(union,productId,success,ignoreError){
        var request=new JlnRequest();
        request.func='getProductRunningBase';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['pid']=productId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getProductRunningBaseRequest=function(productId,success,ignoreError){
       var request= getProductRunningBaseRq(true,productId,success,ignoreError);
       return request;
    }
	this.getProductRunningBase=function(productId,success,ignoreError){
       var request= getProductRunningBaseRq(false,productId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function queryProductInfoByIdsRq(union,productIds,order,isAsc,page,countPerPage,success,ignoreError){
        var request=new JlnRequest();
        request.func='queryProductInfoByIds';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['pi']=productIds;
		request.params['o']=order;
		request.params['ia']=isAsc;
		request.params['p']=page;
		request.params['cpp']=countPerPage;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.queryProductInfoByIdsRequest=function(productIds,order,isAsc,page,countPerPage,success,ignoreError){
       var request= queryProductInfoByIdsRq(true,productIds,order,isAsc,page,countPerPage,success,ignoreError);
       return request;
    }
	this.queryProductInfoByIds=function(productIds,order,isAsc,page,countPerPage,success,ignoreError){
       var request= queryProductInfoByIdsRq(false,productIds,order,isAsc,page,countPerPage,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function submitProductApprovalRq(union,teamToken,productId,success,ignoreError){
        var request=new JlnRequest();
        request.func='submitProductApproval';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['teamToken']=teamToken;
		request.params['pid']=productId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.submitProductApprovalRequest=function(teamToken,productId,success,ignoreError){
       var request= submitProductApprovalRq(true,teamToken,productId,success,ignoreError);
       return request;
    }
	this.submitProductApproval=function(teamToken,productId,success,ignoreError){
       var request= submitProductApprovalRq(false,teamToken,productId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function addVisitProductCountRq(union,productId,success,ignoreError){
        var request=new JlnRequest();
        request.func='addVisitProductCount';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['pid']=productId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.addVisitProductCountRequest=function(productId,success,ignoreError){
       var request= addVisitProductCountRq(true,productId,success,ignoreError);
       return request;
    }
	this.addVisitProductCount=function(productId,success,ignoreError){
       var request= addVisitProductCountRq(false,productId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function queryProductByFactorRq(union,factorType,topCount,success,ignoreError){
        var request=new JlnRequest();
        request.func='queryProductByFactor';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['ft']=factorType;
		request.params['tc']=topCount;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.queryProductByFactorRequest=function(factorType,topCount,success,ignoreError){
       var request= queryProductByFactorRq(true,factorType,topCount,success,ignoreError);
       return request;
    }
	this.queryProductByFactor=function(factorType,topCount,success,ignoreError){
       var request= queryProductByFactorRq(false,factorType,topCount,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function queryMyProductsRq(union,teamToken,productId,order,isAsc,page,countPerPage,success,ignoreError){
        var request=new JlnRequest();
        request.func='queryMyProducts';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['teamToken']=teamToken;
		request.params['pid']=productId;
		request.params['o']=order;
		request.params['ia']=isAsc;
		request.params['p']=page;
		request.params['cpp']=countPerPage;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.queryMyProductsRequest=function(teamToken,productId,order,isAsc,page,countPerPage,success,ignoreError){
       var request= queryMyProductsRq(true,teamToken,productId,order,isAsc,page,countPerPage,success,ignoreError);
       return request;
    }
	this.queryMyProducts=function(teamToken,productId,order,isAsc,page,countPerPage,success,ignoreError){
       var request= queryMyProductsRq(false,teamToken,productId,order,isAsc,page,countPerPage,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getUserProductOrdersRq(union,teamToken,productId,userId,success,ignoreError){
        var request=new JlnRequest();
        request.func='getUserProductOrders';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['teamToken']=teamToken;
		request.params['pid']=productId;
		request.params['uid']=userId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getUserProductOrdersRequest=function(teamToken,productId,userId,success,ignoreError){
       var request= getUserProductOrdersRq(true,teamToken,productId,userId,success,ignoreError);
       return request;
    }
	this.getUserProductOrders=function(teamToken,productId,userId,success,ignoreError){
       var request= getUserProductOrdersRq(false,teamToken,productId,userId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function setOrderFormStatusRq(union,token,orderId,status,success,ignoreError){
        var request=new JlnRequest();
        request.func='setOrderFormStatus';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['token']=token;
		request.params['oid']=orderId;
		request.params['s']=status;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.setOrderFormStatusRequest=function(token,orderId,status,success,ignoreError){
       var request= setOrderFormStatusRq(true,token,orderId,status,success,ignoreError);
       return request;
    }
	this.setOrderFormStatus=function(token,orderId,status,success,ignoreError){
       var request= setOrderFormStatusRq(false,token,orderId,status,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function submitOrderApprovalRq(union,token,orderId,success,ignoreError){
        var request=new JlnRequest();
        request.func='submitOrderApproval';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['token']=token;
		request.params['oid']=orderId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.submitOrderApprovalRequest=function(token,orderId,success,ignoreError){
       var request= submitOrderApprovalRq(true,token,orderId,success,ignoreError);
       return request;
    }
	this.submitOrderApproval=function(token,orderId,success,ignoreError){
       var request= submitOrderApprovalRq(false,token,orderId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getProductNetHistorysRq(union,productId,page,countPerPage,success,ignoreError){
        var request=new JlnRequest();
        request.func='getProductNetHistorys';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['pid']=productId;
		request.params['p']=page;
		request.params['cpp']=countPerPage;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getProductNetHistorysRequest=function(productId,page,countPerPage,success,ignoreError){
       var request= getProductNetHistorysRq(true,productId,page,countPerPage,success,ignoreError);
       return request;
    }
	this.getProductNetHistorys=function(productId,page,countPerPage,success,ignoreError){
       var request= getProductNetHistorysRq(false,productId,page,countPerPage,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function setProductHistroyNetsRq(union,token,productSId,filePath,success,ignoreError){
        var request=new JlnRequest();
        request.func='setProductHistroyNets';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['token']=token;
		request.params['psid']=productSId;
		request.params['fp']=filePath;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.setProductHistroyNetsRequest=function(token,productSId,filePath,success,ignoreError){
       var request= setProductHistroyNetsRq(true,token,productSId,filePath,success,ignoreError);
       return request;
    }
	this.setProductHistroyNets=function(token,productSId,filePath,success,ignoreError){
       var request= setProductHistroyNetsRq(false,token,productSId,filePath,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getProductRiskIndicatorByProductIdRq(union,productId,success,ignoreError){
        var request=new JlnRequest();
        request.func='getProductRiskIndicatorByProductId';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['pid']=productId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getProductRiskIndicatorByProductIdRequest=function(productId,success,ignoreError){
       var request= getProductRiskIndicatorByProductIdRq(true,productId,success,ignoreError);
       return request;
    }
	this.getProductRiskIndicatorByProductId=function(productId,success,ignoreError){
       var request= getProductRiskIndicatorByProductIdRq(false,productId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getDailyHistogramDataRq(union,productId,isPressure,success,ignoreError){
        var request=new JlnRequest();
        request.func='getDailyHistogramData';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['pid']=productId;
		request.params['ip']=isPressure;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getDailyHistogramDataRequest=function(productId,isPressure,success,ignoreError){
       var request= getDailyHistogramDataRq(true,productId,isPressure,success,ignoreError);
       return request;
    }
	this.getDailyHistogramData=function(productId,isPressure,success,ignoreError){
       var request= getDailyHistogramDataRq(false,productId,isPressure,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function setProductCreateFinishRq(union,productId,success,ignoreError){
        var request=new JlnRequest();
        request.func='setProductCreateFinish';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['pid']=productId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.setProductCreateFinishRequest=function(productId,success,ignoreError){
       var request= setProductCreateFinishRq(true,productId,success,ignoreError);
       return request;
    }
	this.setProductCreateFinish=function(productId,success,ignoreError){
       var request= setProductCreateFinishRq(false,productId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getBuyNoticeMapRq(union,sId,success,ignoreError){
        var request=new JlnRequest();
        request.func='getBuyNoticeMap';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['sid']=sId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getBuyNoticeMapRequest=function(sId,success,ignoreError){
       var request= getBuyNoticeMapRq(true,sId,success,ignoreError);
       return request;
    }
	this.getBuyNoticeMap=function(sId,success,ignoreError){
       var request= getBuyNoticeMapRq(false,sId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getProductExtendMapRq(union,productId,success,ignoreError){
        var request=new JlnRequest();
        request.func='getProductExtendMap';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['pid']=productId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getProductExtendMapRequest=function(productId,success,ignoreError){
       var request= getProductExtendMapRq(true,productId,success,ignoreError);
       return request;
    }
	this.getProductExtendMap=function(productId,success,ignoreError){
       var request= getProductExtendMapRq(false,productId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getProductRiskControlMapRq(union,productId,success,ignoreError){
        var request=new JlnRequest();
        request.func='getProductRiskControlMap';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['pid']=productId;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getProductRiskControlMapRequest=function(productId,success,ignoreError){
       var request= getProductRiskControlMapRq(true,productId,success,ignoreError);
       return request;
    }
	this.getProductRiskControlMap=function(productId,success,ignoreError){
       var request= getProductRiskControlMapRq(false,productId,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }

	function getProductSimpleIdListRq(union,IdList,success,ignoreError){
        var request=new JlnRequest();
        request.func='getProductSimpleIdList';
        request.token = Base.localStorage.getItem('request_token');
		
		request.params['il']=IdList;

		if (union == true) {
	        request.svr = 'product';
            request.ignoreError = ignoreError;
	        request.success = success;
        }
	    return request;
    }
	this.getProductSimpleIdListRequest=function(IdList,success,ignoreError){
       var request= getProductSimpleIdListRq(true,IdList,success,ignoreError);
       return request;
    }
	this.getProductSimpleIdList=function(IdList,success,ignoreError){
       var request= getProductSimpleIdListRq(false,IdList,success,ignoreError);
       productSubmit(request, success, ignoreError);

    }
}

});
